package org.feiye.studyday07;

public class PaiXu {

	public static void main(String[] args) {
		// 降序排序：
		int temp = 0;
		int[] nums = new int[] { 5, 22, 44, 6, 2 };
		for (int i = nums.length - 1; i > 0; i--) {
			for (int j = 0; j < i; j++) {
				if (nums[j] < nums[j + 1]) {
					temp = nums[j + 1];
					nums[j + 1] = nums[j];
					nums[j] = temp;
				}
			}
		}
		for (int i = 0; i < nums.length; i++) {
			System.out.print(nums[i] + " ");
		}

	}

}
